***Use ReplicationData.dta***

*******Main Models*******

***Model 1***

logit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac, cluster (ccode)



***Model 2***

logit binaryType2Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac, cluster (ccode)








*******Main Tables*******

***Table I***
sum binaryType1Create, detail
tab binaryType1Create
sum binaryType2Create, detail
tab binaryType2Create
sum ailevels, detail
tab ailevels
sum unchrlevels, detail
tab unchrlevels


***Table II***

***Model 1***

logit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac, cluster (ccode)
estat ic
tab type1Create if e(sample)


***Model 2***

logit binaryType2Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac, cluster (ccode)
estat ic
tab type2Create if e(sample)








*******Main Figures*******

***Figure 1. Number of instances of naming and shaming from Amnesty International***

**Note: first must transform data set to sum of instances by year using collapse**
collapse (sum) aiTotal, by(year)
*change AI 0s to missing since only avaialble 1986-2000*
drop if year > 2000
drop if year < 1986

*run graph code*
#delimit ;

graph twoway 
   (line aiTotal year,                                  
   mcolor(black)                                   
   msize(*1.5)
   xaxis (1 2)                                     
   yaxis (1 2)                                     
   ylabel(, axis(2) nolabel)                       
   xlabel(, axis(2) nolabel)                       
   ylabel(#4, axis(1) labsize(small))                       
   xlabel(#3, axis(1) labsize(small))                       
   ylabel(#4, axis(2) labsize(small))                       
   xlabel(#3, axis(2) labsize(small))                       
   xtitle("", axis(2))                             
   ytitle("", axis(2))
   xtitle("Year", axis(1))                             
   ytitle("Number of instances of shaming", axis(1))
   ) 
;




***Figure 2. Number of instances of naming and shaming from UNCHR***

**Note: first must transform data set to sum of instances by year using collapse**
collapse (sum) dummyunchr, by(year)
*drop years not included in analysis to be on same scale as AI shaming graphic (figure 1)*
drop if year > 2000
drop if year < 1986

*run graph code*
#delimit ;

graph twoway 
   (line dummyunchr year,                                  
   mcolor(black)                                   
   msize(*1.5)
   xaxis (1 2)                                     
   yaxis (1 2)                                     
   ylabel(, axis(2) nolabel)                       
   xlabel(, axis(2) nolabel)                       
   ylabel(#4, axis(1) labsize(small))                       
   xlabel(#3, axis(1) labsize(small))                       
   ylabel(#4, axis(2) labsize(small))                       
   xlabel(#3, axis(2) labsize(small))                       
   xtitle("", axis(2))                             
   ytitle("", axis(2))
   xtitle("Year", axis(1))                             
   ytitle("Number of instances of shaming", axis(1))
   ) 
;




***Figure 3: Number of PGMs in existence over time***

**Note: first must transform data set to sum of instances by year using collapse**
collapse (sum) type1Exist type2Exist,  by(year)

*drop extra years*
drop if year > 2002

*Run graph code*

#delimit ;

graph twoway 
   (line type2Exist year,
   scheme(s1color)                                   
   mcolor(black)                                   
   msize(*1.5)
   lpattern(dash)
   lwidth(medthick)
   lcolor(black)
   xaxis (1 2)                                     
   yaxis (1 2)                                     
   ylabel(, axis(2) nolabel)                       
   xlabel(, axis(2) nolabel)
   xscale(range(1978 (4) 2002))                         
   ylabel(#4, axis(1) labsize(small))                       
   xlabel(#3, axis(1) labsize(small))                       
   ylabel(#4, axis(2) labsize(small))                       
   xlabel(#3, axis(2) labsize(small))                       
   xtitle("", axis(2))                             
   ytitle("", axis(2))
   xtitle("Year", axis(1))                             
   ytitle("Number of PGMs in existence", axis(1))    
   )
   (line type1Exist year,                                  
   mcolor(black)                                   
   msize(*1.5)
   lpattern(solid)
   lwidth(medthick)
   lcolor(black)
   xaxis (1 2)                                     
   yaxis (1 2)                                     
   ylabel(, axis(2) nolabel)                       
   xlabel(, axis(2) nolabel)
   xscale(range(1978 (4) 2002))                       
   ylabel(#4, axis(1) labsize(small))                       
   xlabel(#3, axis(1) labsize(small))                       
   ylabel(#4, axis(2) labsize(small))                       
   xlabel(#3, axis(2) labsize(small))                       
   xtitle("", axis(2))                             
   ytitle("", axis(2))
   xtitle("Year", axis(1))                             
   ytitle("Number of PGMs in existence", axis(1))
   ) 
;


***Figure 4. First Differences of UNCHR and AI Shaming***

**Run Model 1**
logit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac, cluster (ccode)

**Margins**
margins, dydx(lagunchrlevels) post level(90)

**Store estimate**
est store lagunchrlevels2

**Repeat for lagailevels varaible**
logit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac, cluster (ccode)

**Margins**
margins, dydx(lagailevels) post level(90)

**Store estimate**
est store lagaievels2

**Plot**
coefplot lagunchrlevels2 lagailevels2, xscale(range(-.005 (.005) .03)) xline(0) xlabel(-.005 (.005) .03)


















*******Appendix Models and Tables*******

***Section A1: Correlations***

corr unchr ainr aibr

corr unchrlevels ailevels




***Section A2: Rare Events Logistic Regressions***

relogit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac, cluster (ccode)

relogit binaryType2Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac, cluster (ccode)




***Section A3: Civil War***

logit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac laguncivilwar lagaicivilwar, cluster (ccode)
estat ic

logit binaryType2Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac laguncivilwar lagaicivilwar, cluster (ccode)
estat ic




***Section A4: OECD***

logit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac lagoecd lagaioecd, cluster (ccode)
estat ic

logit binaryType2Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac lagoecd lagaioecd, cluster (ccode)
estat ic




***Section A5: CIRI***

logit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac lagciri, cluster (ccode)
estat ic


logit binaryType2Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac lagciri, cluster (ccode)
estat ic

logit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac lPTS_S, cluster (ccode)
estat ic

logit binaryType2Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac lPTS_S, cluster (ccode)
estat ic



***Section A6: UNCHR Membership***

logit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac if HRCMEMBE == 1, cluster (ccode)
estat ic

logit binaryType2Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac if HRCMEMBE == 1, cluster (ccode)
estat ic



***Section A7: Controls for Naming and Shaming Biases***

logit binaryType1Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac lla lwestern, cluster (ccode)
estat ic

logit binaryType2Create lagunchrlevels lagailevels lagjcrHighAut lagjcrWeakDem lagjcrHighDem lagjcrdemaidgdptrans lagjcrdistancetrans lagjcrautaidgdptrans lagjcrany_strikes lagjcrany_riots lagjcrany_demos lagjcrany_guerrilla lagjcrcivilviolence lagjcrcivilwar lagjcrln_rgdp lagjcrln_pop lagjcrethfrac lla lwestern, cluster (ccode)
estat ic



***End of file***
